package com.aaa.backsystem.entity;

import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author gyc
 * @since 2020-07-25
 */
@TableName("tbl_sale")
public class Sale extends Model<Sale> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键自增
     */
    @TableId(value = "sale_id", type = IdType.AUTO)
    private Integer saleId;
    /**
     * 加油站ID
     */
    @TableField("petrol_station_id")
    private Integer petrolStationId;
    /**
     * 证件类型
     */
    @TableField("card_type")
    private String cardType;
    /**
     * 证件号码
     */
    @TableField("card_number")
    private String cardNumber;
    /**
     * 买家姓名
     */
    private String buyer;
    /**
     * 买家性别
     */
    private String sex;
    /**
     * 民族
     */
    private String nation;
    /**
     * 出生日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birth;
    /**
     * 家庭地址
     */
    @TableField("home_address")
    private String homeAddress;
    /**
     * 身份证签发机关
     */
    private String police;
    /**
     * 工作单位
     */
    private String workplace;
    /**
     * 实际居住地址
     */
    private String address;
    /**
     * 油品类型
     */
    @TableField("oil_type")
    private String oilType;
    /**
     * 购买数量
     */
    @TableField("buy_num")
    private Float buyNum;
    /**
     * 购买时间
     */
    @TableField("buy_time")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date buyTime;
    /**
     * 购买用途
     */
    private String purpose;
    /**
     * 备注
     */
    private String remark;
    /**
     * 删除标志(0存在 1删除)
     */
    @TableField("del_flag")
    private String delFlag;


    public Integer getSaleId() {
        return saleId;
    }

    public void setSaleId(Integer saleId) {
        this.saleId = saleId;
    }

    public Integer getPetrolStationId() {
        return petrolStationId;
    }

    public void setPetrolStationId(Integer petrolStationId) {
        this.petrolStationId = petrolStationId;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getBuyer() {
        return buyer;
    }

    public void setBuyer(String buyer) {
        this.buyer = buyer;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public Date getBirth() {
        return birth;
    }

    public void setBirth(Date birth) {
        this.birth = birth;
    }

    public String getHomeAddress() {
        return homeAddress;
    }

    public void setHomeAddress(String homeAddress) {
        this.homeAddress = homeAddress;
    }

    public String getPolice() {
        return police;
    }

    public void setPolice(String police) {
        this.police = police;
    }

    public String getWorkplace() {
        return workplace;
    }

    public void setWorkplace(String workplace) {
        this.workplace = workplace;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getOilType() {
        return oilType;
    }

    public void setOilType(String oilType) {
        this.oilType = oilType;
    }

    public Float getBuyNum() {
        return buyNum;
    }

    public void setBuyNum(Float buyNum) {
        this.buyNum = buyNum;
    }

    public Date getBuyTime() {
        return buyTime;
    }

    public void setBuyTime(Date buyTime) {
        this.buyTime = buyTime;
    }

    public String getPurpose() {
        return purpose;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Override
    protected Serializable pkVal() {
        return this.saleId;
    }

    @Override
    public String toString() {
        return "Sale{" +
                "saleId=" + saleId +
                ", petrolStationId=" + petrolStationId +
                ", cardType=" + cardType +
                ", cardNumber=" + cardNumber +
                ", buyer=" + buyer +
                ", sex=" + sex +
                ", nation=" + nation +
                ", birth=" + birth +
                ", homeAddress=" + homeAddress +
                ", police=" + police +
                ", workplace=" + workplace +
                ", address=" + address +
                ", oilType=" + oilType +
                ", buyNum=" + buyNum +
                ", buyTime=" + buyTime +
                ", purpose=" + purpose +
                ", remark=" + remark +
                ", delFlag=" + delFlag +
                "}";
    }
}